[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 toupper()               Convert 'c' to Uppercase, If Appropriate

 #include   <ctype.h>

 int        toupper(c);
 int        c;                           Character to be converted

    toupper() converts 'c' to uppercase, if 'c' is a lowercase letter. If
    'c' is already uppercase, it remains unchanged.

       Returns:     The converted character 'c'.  There is no error
                    return.

   -------------------------------- Example ---------------------------------

    The following statements convert the characters in 'string' to
    uppercase before printing them.

           #include <ctype.h>
           #include <stdio.h>

           char string[15] = "Alphabet Soup";
           int x;

           main()
           {
               for (x = 0; x < strlen(string); x++)
                   printf("%c",toupper(string[x]));
               printf("\n");
           }


See Also: isupper() islower() _toupper()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson